/**
 * 作者: wgx
 * 日期: 2024-12-18 14:44:57
 * 备注: 每日任务配置表
 */
package com.motu.monstercity.server.game.commondata.maintask;

import io.vertx.core.json.JsonObject;

public class TaskDayModel {
    protected int id; // 数据库ID
    protected int taskType; // 任务类型
    protected long num; // 需要达到的数值
    protected String reward; // 奖励
    protected int active; // 获得的活跃度

    public TaskDayModel() {
    }

    public TaskDayModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        taskType = obj.containsKey("task_type") ? obj.getInteger("task_type") : 0;
        num = obj.containsKey("num") ? obj.getLong("num") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
        active = obj.containsKey("active") ? obj.getInteger("active") : 0;
    }

    public int getId() {
        return id;
    }

    public int getTaskType() {
        return taskType;
    }

    public long getNum() {
        return num;
    }

    public String getReward() {
        return reward;
    }

    public int getActive() {
        return active;
    }

}
